package com.lancoo.cvas.service;


import com.lancoo.cvas.entity.PeriodScheme;
import com.lancoo.cvas.pojo.dto.PeriodSchemeDto;
import com.lancoo.cvas.pojo.response.LockerInfo;
import com.lancoo.cvas.pojo.response.basicPlatform.*;
import com.lancoo.cvas.pojo.vo.CurrentTermInfo;
import com.lancoo.cvas.util.Result;

import java.time.LocalDateTime;
import java.util.List;

public interface YunService {

    SubSystemsMainServer getSubSystemsMainServer(String sysId,Boolean isInner);

    /**
     * 同步教室
     */
    String syncRoom(Integer taskId, String schoolId, String term);

    /**
     * 同步年级专业
     */
    void syncMajor(Integer taskId, String schoolId, String term);


    /**
     * 获取学期信息
     *
     * @param schoolId
     * @return
     */
    List<TermBasicInfo> getAllTermInfo(String schoolId);

    /**
     * 获取基础平台年级
     *
     * @param schoolId
     * @return
     */
    List<BaseGrade> getGrade(String schoolId);

    /**
     * @param taskId:   任务id
     * @param weekSet:  大小周
     * @param schoolId: 学校id
     * @param term:     学期
     * @Description: 同步课时信息
     * @Author: liufeng
     * @Date: 2023/12/4 19:44
     * @return:
     */
    void syncPeriodScheme(Integer taskId, Integer weekSet, String schoolId, String term);

    List<PeriodScheme> getPeriodScheme(Integer taskId, String schoolId, String term);

    /**
     * 通过token获取用户信息
     * @param token
     * @param taskId
     * @return
     */
    UserInfo getUserInfoByToken(String token, Integer taskId);



    /**
     * 同步教学计划  专业  课程 环节 学生
     * @param taskId
     * @param schoolId
     * @param term
     * @return
     */
    String syncPlanTeaching(Integer taskId, String schoolId, String term);



    /**
     * 获取课程库
     *
     * @param schoolId
     * @param term
     * @return
     */
    String syncCourse(Integer taskId, String schoolId, String term);


    /**
     * 获取环节库
     *
     * @param schoolId
     * @param term
     * @return
     */
    String syncSegment(Integer taskId, String schoolId, String term);


    /**
     * 同步行政班
     * @param taskId
     * @param schoolId
     */
    void syncClassInfo(Integer taskId,String schoolId,String term, List<String> gradeList);


    /**
     * 通过班主任id获取班级信息
     * @param teacherId
     * @return
     */
    List<BaseInfoByTeacherID> getClassInfoByTeacherId(String teacherId);


    /**
     *同步学生
     * @param taskId
     * @param schoolId
     * @param gradeList
     */
    void syncStudent(Integer taskId, String schoolId);


    /**
     * 同步教师
     * @param taskId
     * @param schoolId
     * @param term
     */
    void syncTeacher(Integer taskId, String schoolId,String term);


    /**
     * 同步重修学生
     * @param taskId
     * @param schoolId
     * @param term
     */
    void syncRetakeStudent(Integer taskId, String schoolId, String term);

    /**
     * 选课开始提醒(学校通知)
     * @param beginTime
     * @param endTime
     * @param taskId
     * @param module
     * @param userId
     * @param userName
     * @param authorization
     */
    void sendSelectCourseStartMsg(LocalDateTime beginTime, LocalDateTime endTime, Integer taskId, String module, String userId, String userName, String authorization);

    /**
     * 取消开班
     * @param teachingClassIds
     * @param taskId
     * @param userId
     * @param userName
     * @param authorization
     */
    void sendSelectCourseCancelMsg(List<Long> teachingClassIds, Integer taskId, String userId, String userName, String authorization);

    /**
     * @Description: 同步教学班到基础平台
     * @Author: liufeng
     * @Date: 2023/12/29 8:52
     * @param taskId:
     * @param userId:
     * @param userName:
     * @param schoolId:
     * @return:
     */
    Result syncTeachingClassToBasic(Integer taskId, String userId, String userName, String schoolId);

    /**
     * @Description: 同步课表到基础平台
     * @Author: liufeng
     * @Date: 2023/12/29 9:13
     * @param taskId:
     * @param userId:
     * @param userName:
     * @param schoolId:
     * @return:
     */
    Result syncScheduleToBasic(Integer taskId, String userId, String userName, String schoolId);

    /**
     * 获取用户信息
     *
     * @param userId
     * @return
     */
    UserInfo getUserInfo(String userId);
    /**
     * 获取加密锁信息
     *
     * @param schoolId
     * @return
     */
    LockerInfo getSubSystemLockerInfoByID(String schoolId);

    Integer logout(String userId, String token);

    List<IdentifyType> getIdentityTypeByUserID(String userId, String token);


    /**
     * 同步课表至基础平台-在线选课
     * @param taskId
     * @param userId
     * @param userName
     * @param schoolId
     * @return
     */
    Result syncOnlineScheduleToBasic(Integer taskId, String userId, String userName, String schoolId);


    /**
     * 获取当前学期
     * @param schoolId
     * @return
     */
    CurrentTermInfo GetCurrentTermInfo(String schoolId);


    /**
     * 检查是否掉线
     * @param token
     * @return
     */
    Object tokenCheck(String token);

    void sendSelectCourseEndMsg(LocalDateTime endTime, Integer taskId, String module, Integer roundId);

    void sendSelectCourseStartMsgWX(LocalDateTime beginTime, LocalDateTime endTime, Integer taskId, String module, String userId, String userName, String authorization);

    /**
     * 发送日志消息
     *
     * @param schoolId
     * @param userId
     * @param userName
     * @param operationTerminal
     * @param operationType
     * @param operationContent
     */
    void uploadLog(String schoolId, String userId, String userName, String operationTerminal, String operationType, String operationContent,String taskId);
}
